// const dateFormat = (value) => {
//  let year = parseInt(value.substr(0,4))+ "年";
//  let month = parseInt(value.substr(4,2))+"月";
//  let day = parseInt(value.substr(6,2))+"日";
//  let hour = value.substr(8,2)+":";
//  let minute = value.substr(10,2)+"";
//  let time = "" + year + month + day + " "+ hour + minute;
//  return time;
// }
//
// export {
// 	dateFormat as dateFormat
// }
export const dateFormat = (value) => {

	let year = parseInt(value.substr(0, 4)) + "年";
	let month = parseInt(value.substr(4, 2)) + "月";
	let day = parseInt(value.substr(6, 2)) + "日";
	let hour = value.substr(8, 2) + ":";
	let minute = value.substr(10, 2) + ":";
	let second = value.substr(12, 2);
	if (!value) {
		return value
	} else if (value.length == 10) {
		return year + month + day
	} else if (value.length == 8) {
		return hour + minute + second
	} else {
		return year + month + day + " " + hour + minute + second;
	}
}

export const dateTransform = (value) => {
	if (value) {
		let year = value.substr(0, 4) + "年";
		let month = value.substr(4, 2) + "月";
		let day = value.substr(6, 2)+ "日";
		return year + month + day;
	} else {
		return '';
	}
}

// export {
// 	dateFormat as dateFormat, dateTransform
// }
